package com.qhhc.hospital.service.impl;

import com.qhhc.hospital.entity.Checks;
import com.qhhc.hospital.mapper.ChecksMapper;
import com.qhhc.hospital.service.IChecksService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ChecksService implements IChecksService {
    @Autowired
    ChecksMapper checksMapper;
    
    @Override
    public int insert(Checks checks) {
        int count = checksMapper.insertChecks(checks);
        return count;
    }
    
    @Override
    public List<Checks> selectAll() {
        List<Checks> checks = checksMapper.selectAllChecks();
        return checks;
    }
    
    @Override
    public Checks selectById(Integer chId) {
        Checks checks = checksMapper.selectChecksById(chId);
        return checks;
    }
    
    @Override
    public int update(Checks checks) {
        return checksMapper.updateChecks(checks);
    }
    
    @Override
    public int delete(Integer chId) {
        return checksMapper.deleteChecks(chId);
    }
} 